# define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
void sort(int* arr, int sz)
{
	int i = 0;
	int j = sz - 1;
	while (i < j)
	{
		while (i < j && arr[i] % 2 != 0)
		{
			i++;
		}
		while (i < j && arr[j] % 2 == 0)
		{
			j--;
		}
		int tmp = arr[i];
		arr[i] = arr[j];
		arr[j] = tmp;
	}
}
int print(int* arr, int sz)
{
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", *(arr + i));
	}
}

int main()
{
	int arr[] = { 1,3,4,2,4,6,7,11,20 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	sort(arr, sz);
	print(arr, sz);
}